const seq = require('../../seq')
const {STRING, INTEGER} = require('../../types')

const Area = seq.define('area', {
  name: {
    type: STRING,
    allowNull: false,
    comment: '地区名字'
  },
  parentId: {
    type: INTEGER,
    defaultValue: 0,
    comment: '父元素id，如果是最高等级 则为0'
  },
  level: {
    type: INTEGER,
    defaultValue: 0,
    allowNull: false,
    comment: '地区等级'
  }
})

module.exports = Area
